package site.brood.common.core.web;


/**
 * 枚举了一些常用API返回码
 */
public enum AjaxCode {
    SUCCESS(200, "成功"),
    ERROR(500, "失败"),
    ILLEGAL_ARGUMENT(401, "参数错误"),
    NEED_LOGIN(402, "未登录"),
    FORBIDDEN(403, "没有权限"),
    UPLOAD_FAIL( 404, "上传文件失败");

    private final int code;
    private final String desc;

    private AjaxCode(int code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode(){
        return code;
    }

    public String getDesc(){
        return desc;
    }
}
